/* This code is restricted under LGPL license */


namespace infoMECHANICA.NHibernateORM.CriteriaBuilder
{
    /// <summary>
    /// This interface is used to extract basic functionality of CriteriaRecorder objects
    /// <remarks>Every ICriteriaRecorder is also a ICriteriaSource</remarks>
    /// </summary>
    public interface ICriteriaRecorder : ICriteriaSource
    {
        /// <summary>
        /// Gets the name of identifier property
        /// <remarks>For merging purpose</remarks>
        /// </summary>
        /// <returns>The name of identifier property</returns>
        string GetIdPropertyName();

        /// <summary>
        /// Parent of this recorder (another recorder)
        /// </summary>
        ICriteriaRecorder GetParent();

        /// <summary>
        /// Whether recorder contains subrecorder which reference another recorders?
        /// </summary>
        bool HasSubreference { get; set; }
    }
}
